package com.um.jdy.platform.activity.manager;

import com.um.jdy.common.activity.service.CouponsStationService;
import com.um.jdy.platform.station.entity.vo.StationItemVO;
import com.um.springboot.starter.entity.Page;
import com.um.springboot.starter.orm.manager.BaseManager;
import com.um.springboot.starter.orm.params.PageParams;
import org.springframework.stereotype.Component;

/**
 * 管理类：营销活动公共管理
 */
@Component
public class ChargeActivityManager extends BaseManager<CouponsStationService> {


    public Page<StationItemVO> getActivityStationPage(PageParams pageParams){
        Page<StationItemVO> page = new Page<>();
        page.setPageNo(pageParams.getPageNo());
        page.setPageSize(pageParams.getPageSize());

        pageParams.getCondition().put("s.com_id",getComId());

        page = service.getCMSViewModelPageBySqlName(page,"get_station_page",
                "get_station_count", StationItemVO.class,pageParams.getProperties(),pageParams.getValues(),
                pageParams.getRangeEntitys(),pageParams.getOrderNames(),pageParams.getSortOns());

        return page;
    }
}
